package org.workplicity.cia.ui.honeycomb.fragments;

import org.workplicity.cia.ui.honeycomb.ElogEditActivity;
import org.workplicity.cia.ui.honeycomb.R;

import android.app.ActionBar;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;

public class LogFragment extends Fragment {

	EditText logsArea;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);

	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub

		View v = inflater.inflate(R.layout.log_fragment, container, false);
		
		logsArea = (EditText)v.findViewById(R.id.tab1toprowlogs);
        logsArea.setText("This is a test log\nThis is another\nHere is a Third\n and this is the last one for now\nOk I lied");
        logsArea.setClickable(true);
        logsArea.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
            	Intent myIntent = new Intent(view.getContext(), ElogEditActivity.class);
                startActivityForResult(myIntent, 0);
            }
        });
		
		return v;

	}

	@Override
	public void onSaveInstanceState(Bundle outState) {
		// TODO Auto-generated method stub
		super.onSaveInstanceState(outState);
	}

	@Override
	public void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
	}
    
    public void onItemSelected(AdapterView parent, View v, int position, long id) { 
		// this will do something
    	
	}

}
